<?php
include 'template/header.php';

 if(isset($_SESSION['tipo_usuario'])){
 
		$id = $_SESSION['tipo_usuario'];
		
		if($id == '7' || $id == '6' ){
?>

<h1 align="center">Cadastro de Funcionário</h1>
<form method="POST" action="cad_func.php" enctype="multipart/form-data">
<p>Nome: <input type="text" name="nm_paciente" size="20" ></p>
<p>CPF: <input type="text" name="cpf" id="cpf" size="20" maxlength="11"></p>
<p>RG: <input type="text" name="rg" id="rg" size="20" maxlength="10"></p>
<p>Data de Nascimeto: <input type="text" id="dt_nasc" name="dtNasc"  maxlength="10"></p>
<p>Sexo: <input type="radio" name="sexo" value="M">Masculino
<input type="radio" name="sexo" value="F">Feminino</p><br/>
Endereço<input type="text" name="end" size="20">
N°: <input type="text" name="end_n" size="20">
Bairro: <input type="text" name="end_bairro" size="20">
CEP: <input type="text" name="end_cep" id="cep" size="20" maxlength="8">
<div>
		   <p><label>Estado:</label>
		   <select id="estado" name="estado">
			   <option value="0"></option>
		   </select>
		   </p>
		</div>
		
		<div>
		<p>
		   <label>Cidade:</label>
		   <select id="cidade" name="cidade">
				
		   </select>
		  </p>
		</div>
		
		<br/>


<p>Telefone: DDD: <input type='text' name='ddd1' maxlength="2" size="2"> Fone: <input type="text" name="tel_cliente" id="telefone" size="20"></p>
<p>Celular : DDD: <input type='text' name='ddd2' maxlength="2" size="2"> Fone: <input type="text" name="tel_outro" id="telefone2" size="20"></p>
<br/>
<p>E-mail: <input type="text" name="email_cliente" size="20"></p>
<p>Senha: <input type="password" name="senha" size="20" maxlength="8"></p>
<?php 
	$sql_fun = "select * from tipoUsuario where id <= 5;";
	$rs_fun = mysql_query($sql_fun, $con);
?>
<p>Função</p>
	<select name="func">
		<option value="0">-----</option>
		<?php while($reg_fun = mysql_fetch_array($rs_fun)){ ?>
		<option value="<?php echo $reg_fun['id']; ?>"><?php echo $reg_fun['tipo']; ?></option>
		<?php } ?>
	</select>
<br/>
<br/>
<?php 
	$sql_esp = "select * from especialidades;";
	$rs_esp = mysql_query($sql_esp, $con);
?>
<p>Especialidade</p>
	<select name="espec">
		<option value="null">-----</option>
		<?php while($reg_esp = mysql_fetch_array($rs_esp)){ ?>
		<option value="<?php echo $reg_esp['id']; ?>"><?php echo $reg_esp['especialidades']; ?></option>
		<?php } ?>
	</select>
<br/>

<p><input type="submit" value="Cadastra"></p>	
</form>



<?php

}
}
	include 'template/footer.php';
?>